﻿@using Newtonsoft.Json.Linq
@model FujiyBlog.Core.DomainObjects.WidgetSetting
@{
        JObject settings = JObject.Parse(Model.Settings??"{}");
}
Title: @Html.TextBox("Title" + Model.Id, settings.Value<string>("Title"))<br/><br/>
Body: @Html.TextArea("Text" + Model.Id, settings.Value<string>("Text"), new {style="width: 700px; height: 300px;"})<br /><br/>
<a href="javascript:void(0);" onclick="javascript:fujiyBlog.widget.saveWidgetSettings(@Model.Id, JSON.stringify({ Title: $('#Title@(Model.Id)').val(), Text: $('#Text@(Model.Id)').val() }));">
    Save</a>